perm filename PROB6.PUB[LSP,JRA]8 blob
sn#223668 filedate 1976-07-07 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002
C00007 ENDMK
C⊗;
.NEXT PAGE;
.SS(The great mothers,,P39:)
The following problems are written (intentionally) with a great deal
of the representation built into them.
They are truly ugly but should be done anyway.
.BEGIN CENTERIT;TABIT3(10,25,36);
.GROUP;
←%2I. The Great Mother of All Functions!!! (⊗→%3tgmoaf%*↔←)
%3
\tgmoaf[x] <= \[isindiv[x] →\[eq[x ;T] → %et%*;
\\\ eq[x;NIL] → %ef%*;
\\\ %et%* → TRYAGAINNEXTWEEK];
\\ eq[first[x];QUOTE] → second[x];
\\ eq[first[x];CAR] → car[tgmoaf[second[x]]];
\\ eq[first[x];CDR] → cdr[tgmoaf[second[x]]];
\\ eq[first[x];CONS] → cons[tgmoaf[second[x]];tgmoaf[third[x]]];
\\ eq[first[x];ATOM] → atom[tgmoaf[second[x]]];
\\ eq[first[x];EQ] → eq[tgmoaf[second[x]];tgmoaf[third[x]]];
\\ %et%* → TRYAGAINNEXTWEEK]
%1
.APART
.GROUP
Evaluate the following:
%21.%3 tgmoaf[T]
%22.%3 tgmoaf[A]
%23.%3 tgmoaf[(CAR (QUOTE (A . B)))]
%24.%3 tgmoaf[(CDR (QUOTE (A B)))]
%25.%3 tgmoaf[(EQ (CAR (QUOTE (A . B))) (QUOTE A))]
%26.%3 tgmoaf[(EQ (CAR (QUOTE (A . B))) A)]
%27.%3 tgmoaf[(ATOM (CAR (QUOTE (A B))))]
.APART
.GROUP
←%2II. The Great Mother of All Functions Revisited!!!(⊗→%3tgmoafr%*↔←)
%3
\tgmoafr[x] <= \[isindiv[x] →\[eq[x;T] → %et%*;
\\\ eq[x;NIL] → %ef%*;
\\\ %et%* → TRYAGAINNEXTWEEK];
\\ eq[first[x];QUOTE] → second[x];
\\ eq[first[x];CAR] → car[tgmoafr[second[x]]];
\\ eq[first[x];CDR] → cdr[tgmoafr[second[x]]];
\\ eq[first[x];CONS] → cons[tgmoafr[second[x]];tgmoafr[third[x]]];
\\ eq[first[x];ATOM] → atom[tgmoafr[second[x]]];
\\ eq[first[x];EQ] → eq[tgmoafr[second[x]];tgmoafr[third[x]]];
\\ eq[first[x];COND] → evcond[rest[x]];
\\ %et%* → TRYAGAINNEXTWEEK]
.APART
.GROUP
\evcond[x] <=\[tgmoafr[first[first[x]]] → tgmoafr[second[first[x]]];
\\ %et%* → evcond[rest[x]] ]
.APART
.GROUP
%1
Evaluate the following:
.BEGIN TABIT2(16,18);
%21.%3 tgmoafr[T]
%22.%3 tgmoafr[(CDR (QUOTE (A B)))]
%23.%3 tgmoafr[(EQ \(CAR (QUOTE (A . B)))
\(QUOTE A))]
%24.%3 tgmoafr[(COND ((EQ (CAR (QUOTE (A . B))) (QUOTE A))(QUOTE FOO)))]
%25.%3 tgmoafr[(COND\((ATOM (QUOTE (A)))(QUOTE FOO))
\(T(QUOTE BAZ)))]
.APART
←Coming soon: %2Son of Great Mother !!%*
.END